﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace Sbook
{
    public partial class XuLyThanhToan2 : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!Page.IsPostBack)
            {
                if (Request.Form["Email"] != null && Request.Form["Phone"] != null)
                {
                    string Email = Request.Form["Email"];
                    string Phone = Request.Form["Phone"];
                    Data.Mysession.Session.Email = Email;
                    Data.Mysession.Session.Phone = Phone;
                    Business.UserService.User_Update(Data.Mysession.Session);
                    Response.Write(Email + "," + Phone);
                }
                else
                {
                    Data.Mysession.Session.MailTo = Request.Form["EmailTo"];
                     Data.Mysession.Session.FullNameTo = Request.Form["FullNameTo"];
                     Data.Mysession.Session.AddressTo = Request.Form["AddressTo"];
                     Data.Mysession.Session.PhoneTo = Request.Form["PhoneTo"];
                     Business.UserService.User_Update(Data.Mysession.Session);
                     Response.Write(Request.Form["EmailTo"] + "," + Request.Form["FullNameTo"] + "," + Request.Form["AddressTo"] + "," + Request.Form["PhoneTo"]);
                }
            }
        }
    }
}